<?php


namespace app\shop\validate;

use think\Validate;

/**
 * 价目表验证器
 * Class GoodsPrice
 * @package app\shop\validate
 * @author Mr.Li
 * @create 2021-06-15 9:49
 */
class GoodsPrice extends Validate
{
    /**
     * 验证规则
     * @var string[]
     */
    protected $rule = [
        'goods_id'                  => 'require',
        'customer_id'               => 'require',
        'price'                     => 'require',
    ];


    /**
     * 错误信息
     * @var string[]
     */
    protected $message = [
        'goods_id.require'          => '商品id必须填写',
        'customer_id.require'       => '客户id必须填写',
        'price.require'             => '价格必须填写',
    ];



    protected $scene = [
        'create'            => ['goods_id','customer_id','price'],
        'update'            => ['goods_id','customer_id','price'],
        'list'              => ['goods_id','customer_id'],
    ];

}
